<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>属性选择器</title>
    <style>
        /* a[target]
        [target="_self"]
        [href="https://www.baidu.com"]
        以指定内容开头 [href^="http://"]
        以指定内容结尾 [href$=".cn"]
        */
        [href*="taobao"] {
            color: red;
        }
    </style>
</head>
<body>
    <a href="https://www.163.com">网易</a>
    <br>
    <a href="http://www.baidu.com" target="_blank">百度</a>
    <br>
    <a href="https://www.sina.com.cn">新浪</a>
    <br>
    <a href="http://www.taobao.com" target="_blank">淘宝</a>
    <br>
    <a href="https://www.jd.com" target="_self">京东</a>
</body>
</html>